#include <iostream>
#include <vector>
using namespace std;

int main()
{
    int n = 0;
    cin >> n;
    vector<vector<int>> v1(n);
    for (int i = 0; i < n; i++)
    {
        v1[i].resize(i+1);
    }
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < i; j++)
        {
            if ((j != 0) && (j != i))
            {
                v1[i][j] = v1[i - 1][j] + v1[i - 1][j - 1];
            }
            else
            {
                v1[i][j] = 1;
            }
            cout << v1[i][j] << " ";
        }
        cout << endl;
    }
}
